package com.edu.controller;

import com.edu.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/*
 * @Author:princess
 * @Date 2023/11/14 11 14 20:22
 *
 */
@Controller
public class UserController {
    @RequestMapping("/user/{id}/article/{articleId}")
    public String test01(@PathVariable("id") int id,@PathVariable("articleId") int articleId){
        System.out.println(id);
        System.out.println(articleId);
        return "/index.jsp";
    }

    @RequestMapping("/user/{username}/{password}")
    public String test02(User user){
        System.out.println(user);
        return "/index.jsp";
    }
}
